import { get, getBuffer, postJson, postFile, del } from "../http";
import { query } from "../weeon/room";
let api = process.env.VUE_APP_API;
if (process.env.VUE_APP_Mock === "true") {
  api = "/mock/";
}

// #获取预警分页列表-人员视角
export const trackPageAlarmPerson =  (p) =>  postJson(`${api}/witness/track/pageAlarmPerson`,p);
// #获取预警分页列表-项目视角
export const trackPageAlarmProject =  (p) =>  postJson(`${api}/witness/track/pageAlarmProject`,p);
// 获取预警详情
export const trackGetAlarm =  (id) =>  get(`${api}/witness/track/getAlarm/${id}`);
// 获取预警回放地址
export const trackGetAlarmPlaybackURLs =  (p) =>  postJson(`${api}/witness/track/getAlarmPlaybackURLs`,p);
// 获取项目-标段-人员
export const trackGetProjectInfo =  (id) =>  get(`${api}/witness/track/getProjectInfo/${id}`);
// 查询人员轨迹
export const trackListTrack =  (p) =>  postJson(`${api}/witness/track/listTrack`,p);
// 根据项目获取人员列表
export const trackListPerson =  ({projectId,bidId}) =>  get(`${api}/witness/track/listPerson?projectId=${projectId}&bdId=${bidId}`);
// export const trackGetProjectInfo = (id) =>  get(`${api}/witness/track/getProjectInfo/${id}`);


export const trackListProjectTrack = (data) =>  postJson(`${api}/witness/track/listProjectTrack`,data);


// 获取工作人员轨迹

export const tracklistPersonByTrack = (data) =>  postJson(`${api}/witness/track/listPersonByTrack`,data);